//
//  AYSCategoryCollectionViewCell.m
//  AiYingShiProject
//
//  Created by lanou on 15/10/28.
//  Copyright © 2015年 李晓理. All rights reserved.
//

#import "AYSCategoryCollectionViewCell.h"

#import <UIImageView+WebCache.h>

@interface AYSCategoryCollectionViewCell ()

@property (nonatomic, strong) UIImageView *thumbImage;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *descLabel;

@end

@implementation AYSCategoryCollectionViewCell

- (void)configureCellWithModel:(AYSCategoryModel *)model
{
    _titleLabel.text = [model programname];
    _descLabel.text = [model shortdesc];
    [_thumbImage sd_setImageWithURL:[NSURL URLWithString:[model vthumburl]]];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        _thumbImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 140)];
        [self.contentView addSubview:_thumbImage];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 150, 100, 15)];
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_titleLabel];
        
        _descLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 170, 100, 15)];
        _descLabel.textColor = [UIColor whiteColor];
        _descLabel.font = [UIFont systemFontOfSize:10];
        [self.contentView addSubview:_descLabel];
    }
    return self;
}

@end
